        .global main
        .global start
        .global IrqService
        .global UndefHandle
        .global PreAbtHandle
        .global DataAbtHandle
        .global FiqHandle

        .text
        .code 32
        .align 2

start:
          b   ResetHandler
          ldr pc,=UndefHandler
          ldr pc,=SwiHandler
          ldr pc,=PrefetchAbtHandler
          ldr pc,=PreDataAbtHandler
          nop
          bl  IrqHandler
          ldr pc,=FiqHandler


ResetHandler:
          mrs r0,cpsr
          bic r0,r0,#0x1f
          orr r0,r0,#0xd2               @interrupt mode
          msr cpsr_cxsf,r0
          ldr sp,=0x33909000

          mrs r0,cpsr
          bic r0,r0,#0xc0
          orr r0,r0,#0x13
          msr cpsr_cxsf,r0
          ldr sp,=0x33900000

      ldr pc, =main

UndefHandler:
        b UndefHandle
SwiHandler:
        b SwiHandler
PrefetchAbtHandler:
        b PreAbtHandle
PreDataAbtHandler:
        b DataAbtHandle
IrqHandler:
        stmfd sp!,{r0-r12,lr}
        bl      IrqService
ExitIrq:
        ldmfd sp!,{r0-r12,lr}
        subs pc,lr,#4
FiqHandler:
        b FiqHandle
pisr: .word 0x32800000
        .end

